package com.shiguiwu.springmybatis.designpattern.proxy.staticproxy;

/**
 * @description: 二手房东
 * @author: stone
 * @date: Created by 2021/3/9 17:34
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.designpattern.proxy.staticproxy
 */
public class TwoHandLandlord implements Landlord {

    private Landlord landlord = new OneHandLandlord();

    @Override
    public void rental() {
        System.out.println("和租金签合同");
        System.out.println("租客交钱。。。。。");
        //代理对象对接一手房东
        landlord.rental();
    }

    @Override
    public void sellHouse() {
        System.out.println("和买房人签合同");
        System.out.println("买房人交钱。。。。。");
        //二手房东对接一手
        landlord.sellHouse();

    }
}
